<div class="attachments form">
    <h3><?php __('Upload file'); ?></h3>    
    <?php    
        $formUrl = array('controller' => 'attachments', 'action' => 'addFile');
        if (isset($this->params['named']['editor'])) {
            $formUrl['editor'] = 1;
        }	
	
	if (isset($this->params['named']['image'])) {
            $formUrl['image'] = 1;
        }
    
        echo $this->Form->create('Attachment', array('url' => $formUrl, 'type' => 'file'));	
	echo $this->Form->input('Attachment.node_id', array('value' => $nodeId, 'type' => 'hidden',));
    ?>
    <fieldset>
    <?php
        echo $this->Form->input('Attachment.filename', array('label' => __('Filename', true), 'type' => 'file'));
	echo $this->Form->input('Attachment.title', array('label' => __('Title', true), 'type' => 'text'));
	echo $this->Form->input('Attachment.description', array('label' => __('Description', true), 'type' => 'textarea'));
    ?>
    </fieldset>

    <div class="buttons">
    <?php
        echo $this->Form->end(array('name' => 'Attachment.upload', 'label' => __('Upload', true)));       
    ?>
    </div>
</div>
